﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace BookTransactionControllers.Services
{
    public interface IMainServices
    {
        /// <summary>
        /// Delete Object in Database
        /// </summary>
        /// <param name="command">Statement to delete</param>
        /// <returns>Delete Ok?</returns>
        bool Delete(SqlCommand command);

        /// <summary>
        /// Select Table From Database depend on SqlCommand
        /// </summary>
        /// <param name="command">Statament to Select</param>
        /// <returns>Data in Table</returns>
        DataTable SelectTable(SqlCommand command, String tblName);

        /// <summary>
        /// Update info of Object
        /// </summary>
        /// <param name="command">Statement to Update</param>
        /// <returns>Update Ok?</returns>
        bool Update(SqlCommand command);
    }
}